package com.bdqn.t382;

//import com.bdqn.t382.anno.Hours;
import com.bdqn.t382.anno.Hours;

@Hours(hours = 4)
@Hours(hours = 4.5)
@Hours(hours = 2)
public class Worker {
public static void main(String[] args) {
     //通过 Hours 注解类型来获取 Worker 中的值数组对象
      Hours[] hours = Worker.class.getAnnotationsByType(Hours.class);
      //遍历数组
      for (Hours h : hours) {
       System.out.println(h);
       }
      }
}
